package wxb.avalon.core.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import wxb.avalon.core.entity.RoomRole;
import wxb.avalon.core.mapper.RoomRoleMapper;
import wxb.avalon.core.service.IRoomRoleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wxb
 * @since 2022-01-18
 */
@Service
public class RoomRoleServiceImpl extends ServiceImpl<RoomRoleMapper, RoomRole> implements IRoomRoleService {

    @Override
    public List<RoomRole> getByRoomNo(String roomNo) {
        LambdaQueryWrapper<RoomRole> lq = Wrappers.lambdaQuery();
        lq.eq(RoomRole::getRoomNo, roomNo);
        return baseMapper.selectList(lq);
    }

}
